# coding=utf-8

import django_filters

from apps.employee.models import Employee


class EmployeeFilter(django_filters.FilterSet):
    shop = django_filters.CharFilter(field_name='shop')
    is_active = django_filters.CharFilter(field_name='user__is_active')
    username = django_filters.CharFilter(field_name='user__username', lookup_expr='icontains')
    name = django_filters.CharFilter(field_name='name', lookup_expr='icontains')

    class Meta:
        model = Employee
        fields = '__all__'
